import { ApiProperty } from '@nestjs/swagger';

export class CreateCouponDto {
  @ApiProperty({
    description: '用户Id',
  })
  userId: string;

  @ApiProperty({
    description: '优惠券名称',
    example: '满减优惠券',
  })
  name: string;

  @ApiProperty({
    description: '优惠策略,举例:discount-70,full-100-reduce-30',
    example: 'full-10-reduce-50',
  })
  strategy: string;

  @ApiProperty({
    description: '适用时间,不传表示所以时间可用,举例:2024-09-05 to 2024-10-05',
    example: '2024-09-05 to 2024-10-05',
    required: false,
  })
  canUseTime?: string | null;
}
